#include <iostream>

using std::cout;
using std::cin;

#include "DivideByZero.h"

double imp(int nr,int den){

	if(den==0)
		throw DivideByZeroException();
	return static_cast<double>(nr)/den;
}
int main()
{
	int nr1,nr2;
	double rez;
	cout<<"Introdu 2 nr";
	while(cin>>nr1>>nr2)
	{
		try
		{
			rez=imp(nr1,nr2);
			cout<<"Rez= "<<rez<<"\n";
		}
		catch(DivideByZeroException &divideByZeroException)
		{
			cout<<"Exceptio occured\n"<<divideByZeroException.what()<<"\n";
		}
	cout<<"Introdu 2 nr";
	}
return 0;
}
